﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PBSD_Development
{
    /// <summary>
    /// 承载力对象
    /// </summary>
    public class CapacityObj
    {
        /// <summary>
        /// 平均值
        /// </summary>
        private double Average { set; get; }

        /// <summary>
        /// 设计值
        /// </summary>
        private double Design { set; get; }

        /// <summary>
        /// 标准值
        /// </summary>
        private double Basic { set; get; }

        /// <summary>
        /// 获得承载力
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public double this[CapacityType capacityType]
        {
            get
            {
                switch (capacityType)
                {
                    case CapacityType.DesignValue: return this.Design;
                    case CapacityType.BasicValue: return this.Basic;
                    case CapacityType.AverageValue: return this.Average;
                    default: return -1F;
                }
            }
        }

        /// <summary>
        /// 空的构造函数
        /// </summary>
        public CapacityObj()
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="design"></param>
        /// <param name="basic"></param>
        /// <param name="average"></param>
        public CapacityObj(double design, double basic, double average)
        {
            this.Design = design;
            this.Basic = basic;
            this.Average = average;
        }
    }
}
